﻿
using System;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using XnaColor = Microsoft.Xna.Framework.Color;
using Colonisator.Classes;
namespace ColonisatorGame
{
    public class MissytownInteractionObject : IslandInteractionObject<Missytown, MissytownAnchorage>
    {
        public MissytownInteractionObject(string texturePath, MissytownAnchorage anchorage)
            : base(texturePath, anchorage)
        {
        }

        public override void SetAbsoluteRectangle<MapIntercationObject>(GameHUD hud, MapIntercationObject map)
        {
            this.AbsoluteRectangle = new Rectangle
                (Convert.ToInt32(hud.menuInteractions.Cadre.Width +
                    map.Texture.Width -
                    hud.fenetrePrincipale.Offset.X -
                    this.Texture.Width
                    ),
                Convert.ToInt32(
                    hud.menuHaut.Cadre.Height +
                    map.Texture.Height -
                    hud.fenetrePrincipale.Offset.Y -
                    this.Texture.Height),
                Convert.ToInt32(this.Texture.Width),
                Convert.ToInt32(this.Texture.Height));
        }
    }
}
